Magic-Sets Transformation for the Analysis of Java Bytecode
نویسندگان
چکیده
Denotational static analysis of Java bytecode has a nice and clean compositional definition and an efficient implementation with binary decision diagrams. But it models only the functional i.e., input/output behaviour of a program P , not enough if one needs P ’s internal behaviours i.e., from the input to some internal program points. We overcome this limitation with a technique used up to now for logic programs only. It adds new magic blocks of code to P , whose functional behaviours are the internal behaviours of P . We prove this transformation correct with an operational semantics. We define an equivalent denotational semantics, whose denotations for the magic blocks are hence the internal behaviours of P . We implement our transformation and instantiate it with abstract domains modelling sharing of two variables and non-cyclicity of variables. We get a static analyser for full Java bytecode that is faster and scales better than another operational pair-sharing analyser and a constraint-based pointer analyser.
منابع مشابه
Magic-sets for localised analysis of Java bytecode
Static analyses based on denotational semantics can naturally model functional behaviours of the code in a compositional and completely context and flow sensitive way. But they only model the functional i.e., input/output behaviour of a program P , not enough if one needs P ’s internal behaviours i.e., from the input to some internal program points. This is, however, a frequent requirement for ...
متن کاملA Provably Correct Stackless Intermediate Representation for Java Bytecode
The Java virtual machine executes stack-based bytecode. The intensive use of an operand stack has been identified as a major obstacle for static analysis and it is now common for static analysis tools to manipulate a stackless intermediate representation (IR) of bytecode programs. Several algorithms have been proposed to achieve such a transformation, but only little attention has been paid to ...
متن کاملBicolanoMT: a Formalization of Multi-Threaded Java at Bytecode Level
This paper describes a formalization of multi-threaded Java bytecode in Coq. The formalization builds on the existing Bicolano formalization for sequential Java bytecode – which captures basically all aspects of sequential bytecode supported by the CLDC (Java for mobile phones) platform. We use a special extension framework to extend the existing formalization in a systematic way. The formaliza...
متن کاملJava bytecode Verification using Analysis and Transformation of Logic Programs
State of the art analyzers in the (Constraint) Logic Programming paradigm (or (C)LP for short) are nowadays mature and sophisticated. They allow inferring a wide variety of global properties including termination, run-time error freeness, bounds on resource consumption, etc. The aim of this work is to automatically transfer the power of such analysis tools for LP to the analysis and verificatio...
متن کاملBytecode Testability Transformation
Bytecode as produced by modern programming languages is well suited for search-based testing: Different languages compile to the same bytecode, bytecode is available also for third party libraries, all predicates are atomic and side-effect free, and instrumentation can be performed without recompilation. However, bytecode is also susceptible to the flag problem; in fact, regular source code sta...
متن کامل